package com.aidex.biz.service;

import com.aidex.biz.domain.RubbishType;
import com.aidex.biz.domain.vo.RubbishTypeEls;
import com.aidex.common.core.domain.TreeNode;
import com.aidex.common.core.service.BaseTreeService;
import com.alibaba.fastjson.JSONObject;

import java.util.List;
import java.util.Map;

/**
 * 部门管理 服务层
 *
 * @author ruoyi
 */
public interface RubbishTypeService extends BaseTreeService<RubbishType> {

    /**
     * 根据展开层级和父节点递归获取展示的数据
     *
     * @param level
     * @param parentId
     * @return
     */
    public List<RubbishType> listDataByLevel(RubbishType sysRubbishType, int level, String parentId);


    /**
     * 是否存在部门子节点
     *
     * @param id) 部门ID
     * @return
     */
    public boolean hasChildByRubbishTypeId(String id);


    /**
     * 校验部门名称是否唯一
     *
     * @param rubbishType 部门信息
     * @return
     */
    public void checkRubbishTypeNameUnique(RubbishType rubbishType);

    /**
     * 构建前端所需要树结构
     *
     * @param level     展开层级
     * @param parentId  父节点ID
     * @param excludeId 排除节点ID
     * @return
     */
    public List<TreeNode> buildRubbishTypeTreeExcludeChild(RubbishType rubbishType, int level, String parentId,
            String excludeId);

    /**
     * 构建前端所需要树结构
     *
     * @param level    展开层级
     * @param parentId 父节点ID
     * @return
     */
    public List<TreeNode> buildRubbishTypeTree(RubbishType sysRubbishType, int level, String parentId);


    /**
     * 根据部门id串查询部门列表
     *
     * @param rubbishTypeIdsObj
     * @return
     */
    public List<Map<String, Object>> getRubbishTypeInfoByIds(JSONObject rubbishTypeIdsObj);

    /**
     * 根据部门编码查询部门
     *
     * @param rubbishTypeCode
     * @return
     */
    public RubbishType selectRubbishTypeByRubbishTypeCode(String rubbishTypeCode);


    /**
     * 查询类型回收报表
     *
     * @param sysRubbishType
     * @return
     */
    public List<RubbishTypeEls> getRubbishTypexls(RubbishType sysRubbishType);

    /**
     * 首页柱状统计
     *
     * @param sysRubbishType
     * @return
     */

    public List<Map<String, Object>> getRubbishTypeStatement(RubbishType sysRubbishType);


}
